﻿using System.Collections.Generic;
using System.Linq;
using JiaBao.Core.Domain;

namespace JiaBao.Core.Data
{
    /// <summary>
    /// EF对象操作接口
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public partial interface IRepository<T> where T : BaseEntity
    {
        T GetById(object id);

        int Insert(T entity);

        int Insert(IEnumerable<T> entities);

        int Update(T entity);

        int Update(IEnumerable<T> entities);

        int Delete(T entity);

        int Delete(IEnumerable<T> entities);

        IQueryable<T> Table { get; }

        IQueryable<T> TableNotracking { get; }


    }
}
